import React,{PureComponent} from 'react';
import {RecomPic,RecommendList} from '../styled'
import {connect} from "react-redux";

class Recommend extends PureComponent{
    render(){
        const {list}=this.props
        return <div>
            <RecommendList>
                {list.map((item)=>{
                    return    <RecomPic key={item.get('id')}>
                            <img className='reImg' src={item.get('imgUrl')} alt=""/>
                        </RecomPic>
                })}

            </RecommendList>
        </div>
    }

}
const mapStateToProps=(state)=>{
    return {
        list:state.getIn(['home','recommendList'])
    }
}
export default connect(mapStateToProps,null)(Recommend);